package com.example.automanagement.service.serviceImpl;

import com.example.automanagement.entity.AutoOrder;
import com.example.automanagement.entity.RepairOrder;
import com.example.automanagement.mapper.OrderArchiveMapper;
import com.example.automanagement.service.OrderArchiveService;

import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderArchiveServiceImpl implements OrderArchiveService {
    @Resource
    private OrderArchiveMapper orderArchiveMapper;

    @Override
    public List<AutoOrder> autoPageList() {

        return orderArchiveMapper.autoPageList();

    }

    @Override
    public List<RepairOrder> repairPageList() {

        return orderArchiveMapper.repairPageList();
    }

    @Override
    public AutoOrder getAutoOrderById(String orderId) {
        return orderArchiveMapper.getAutoOrderById(orderId);
    }

    @Override
    public RepairOrder getRepairOrderById(String orderId) {
        return orderArchiveMapper.getRepairOrderById(orderId);
    }

    @Override
    public void updateAutoOrderStatus(String autoId) {
         orderArchiveMapper.updateAutoOrderStatus(autoId);
    }

    @Override
    public void updateRepairOrderStatus(String repairOrderId) {
        orderArchiveMapper.updateRepairOrderStatus(repairOrderId);
    }
}
